#ifndef FB_DRV_H
#define FB_DRV_H
#include <linux/fb.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct fb_card {
    int fd;
    unsigned char *vaddr;
    unsigned int screen_size;
    unsigned int buffer_index;
    unsigned int buffer_count;
    struct fb_var_screeninfo vinfo;
    struct fb_fix_screeninfo finfo;
}fb_card;

int fb_card_init(struct fb_card *card,char *devname);
int fb_card_print_info (struct fb_card card);
int fb_switch_buffer(struct fb_card *card,unsigned int index);
int fb_cpy(struct fb_card *card,void * addr,unsigned int size);
int fb_double_cpy(struct fb_card *card,void * addr,unsigned int size);

//int double_fb_refresh ();
//int argb_fb_test (char *fb);

#ifdef __cplusplus
}
#endif

#endif // V4L2_START_H
